#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	long long n,ret;
	cin>>n;
	while(n!=1){
		if(n%2==1){
			ret=n*3+1;
			printf("%lld*3+1=%lld\n",n,ret);
			n=ret;
		}else{
			ret=n/2;
			printf("%lld/2=%lld\n",n,ret);
			n=ret;
		}
	}
	if(n==1){
		cout<<"End"<<endl;
	}
	
	return 0;	
}

int main31()
{
	long long m,k;
	int count=0;
	cin>>m>>k;
	while(m!=0){
		if(m%10==3)
		count++;
		m/=10;
	}
	if(count==k)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
	return 0;
}

int main30()
{
    int n;
    long long sum=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        sum+=i;
    }
    cout<<sum<<endl;
    return 0;
}
int main29()
{
	int x,p1=0,p2=0,p3=0,p4=0;
	cin>>x;
	int f1=x%2==0;
	int f2=x>4&&x<=12;
	
	if(f1&&f2)
	p1=1;
	if(f1||f2)
	p2=1;
	if((f1&&!f2)||(!f1&&f2))
	p3=1;
	if(!f1&&!f2)
	p4=1;
	
	cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;
	
	
	return 0;
}

int main28()
{
	unsigned int m,t,s;
	cin>>m>>t>>s;
	int ret=m-1.0*s/t;
	if(ret<0||ret==0)
	ret=0;
	cout<<ret<<endl;
	return 0;
}

int main27()
{
	long long X,Y,Z;
	cin>>X>>Y;
	if(Y%X==0){
		Z=Y+X;
	}else{
		Z=Y-X;
	}
	cout<<Z<<endl;
	return 0;
}

int main26()
{
	int a1,a2,n,an;
	cin>>a1>>a2>>n;
	an=a1+(a2-a1)*(n-1);
	cout<<an<<endl;
	return 0;
}

int main25()
{
	int x;
	long y;
	cin>>x>>y;
	if(x>y)
	cout<<">"<<endl;
	else if(x<y)
	cout<<"<"<<endl;
	else
	cout<<"="<<endl;
	
	return 0;
}

int main24()
{
	unsigned int m,n;
	cin>>m>>n;
	if(m%n==0)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
	return 0;
}

int main23()
{
	long long N;
	cin>>N;
	if(N>0)
	cout<<"positive"<<endl;
	else if(N==0)
	cout<<"zero"<<endl;
	else
	cout<<"negative";
	
	return 0;
}

int main22()
{
	int arr[5]={0};
	for(int i=0;i<5;i++){
		cin>>arr[i];
	}
	for(int i=0;i<5;i++){
		arr[i]/=3;
		if(i==0){
			arr[4]+=arr[i];
			arr[i+1]+=arr[i];
		}else if(i==4){
			arr[i-1]+=arr[i];
			arr[0]+=arr[i];
		}else{
			arr[i-1]+=arr[i];
			arr[i+1]+=arr[i];
		}
	}
	for(int i=0;i<5;i++){
		printf("%5d",arr[i]);
	}
	
	return 0;
}

int main21()
{
	int a,b,c;
	cin>>a>>b>>c;
	printf("%8d %8d %8d",a,b,c);
	return 0;
}

int main20()
{
	double PI=3.14159;
	double r,d,C,S;
	
	cin>>r;
	d=2.0*r;
	C=PI*d;
	S=PI*r*r;
	
	printf("%.4lf %.4lf %.4lf",d,C,S);
	return 0;
}

int main19()
{
	double r1,r2,R;
	cin>>r1>>r2;
	
	R=1.0/((1.0/r1)+(1.0/r2));
	printf("%.2lf",R);
	
	return 0;
}

int main18()
{
	double F;
	cin>>F;
	double C=5*(F-32)/9;
	
	printf("%.5lf",C);
	
	return 0;
}

int main17()
{
	long long a;
	int b;
	scanf("%lld",&a);
	scanf("%d",&b);
	
	double c=b*1.0/a*100;
	printf("%.3lf%%",c);
	return 0;
}

int main16()
{
    int a,b;
    cin>>a>>b;
    double ret=1.0*a/b;
    printf("%.3lf",ret);
    return 0;
}

int main15()
{
	int x;
	cin>>x;
	cout<<(char)x<<endl;
	return 0;
}

int main14()
{
	char c;
	cin>>c;
	cout<<(int)c<<endl;
	return 0;
}

int main13()
{
	double x;
	cin>>x;
	cout<<(long)x<<endl;
	return 0;
}

int main12()
{
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(int)(a*0.2+b*0.3+c*0.5)<<endl;
    return 0;
}

int main11()
{
	int a,b;
	cin>>a>>b;
	cout<<b<<" "<<a<<endl;
	
	return 0;
}

int main10()
{
	int rest=100;
	
	rest+=10;
	cout<<rest<<endl;
	
	rest-=20;
	cout<<rest<<endl;
	
	rest=0;
	cout<<rest<<endl;
	return 0;
}

int main9()
{
	int hour1,min1,hour2,min2;
	int hour3,min3;
	cin>>hour1>>min1>>hour2>>min2;
	if(min2-min1<0){
		min3=min2+60-min1;
		hour3=hour2-1-hour1;
	}else{
		min3=min2-min1;
		hour3=hour2-hour1;
	}
	cout<<hour3<<" "<<min3<<endl;
	
	return 0;
}

int main8()
{
    int sec=0;
    cin>>sec;
    int hour=sec/3600;
    int minute=sec%3600/60;
    int seconds=sec%3600%60;
    cout<< hour <<" "<<minute<<" "<<seconds<<endl;
    return 0;
}

int main7()
{
    int a=0;
    cin>>a;
    int shi=a/10%10;
    cout<<shi<<endl;
    
    return 0;
}

int main6()
{
    int a=0;
    cin>>a;
    cout<<a%10<<endl;
    return 0;
}

int main5()
{
	int a,b;
	cin >> a >> b;
	int div=a/b;
	int mod=a%b;
	cout << div <<" "<<mod<<endl;
	return 0;
}

int main4()
{
	int a,b,c;
	cin >> a >>b>>c;
	cout<<(a+b)*c;
	return 0;
 } 

int main3()
{
	int head=35;
	int feet=94;
	
	int ch=(4*head-feet)/2;
	int r=head - ch;
	
	cout<<r<<" "<<ch;
	return 0;
}


int a,b; 
int main2(){
	cin >> a >>b;
	cout <<a+b<<endl;
	return 0;
}



const int price = 100;

int main1()
{
    int x = 0;
    cin >> x;
    int sum=x*price;
    cout << sum << endl;
    return 0;
}

